package org.gthelper.data;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * 发送返回数据
 * @author 易超
 *
 */
public class SendData {

	public static void send(InputStream src,OutputStream out,int bufSize) throws IOException
	{
		byte[]b=new byte[bufSize];
	    for(int i=0;i<10000;i++)
	    {
	    	int n=src.read(b);
	    	if(n<1)
	    		break;
	    	byte [] t=new byte[n];
	    	for(int i1=0;i1<n;i1++)
	    		t[i1]=b[i1];
	        out.write(t); 
	        out.flush();
	    }
	}
	
}
